package com.admin.service;

import com.admin.entity.Permission;
import com.admin.vo.query.PermissionQueryVo;
import com.admin.vo.query.RolePermissionVo;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author szy
 * @since 2023-02-21
 */
public interface PermissionService extends IService<Permission> {
    //根据用户ID查询用户权限菜单列表
    List<Permission> findPermissionListByUserId(Long userId);


//    查询菜单列表
    List<Permission> findPermissionList(PermissionQueryVo permissionQueryVo);
//    查询上级菜单列表
    List<Permission> findParentPermissionList();
//    判断菜单是否有子菜单
    boolean hasChildrenOfPermission(Long id);
    /*查询权限列表*/
    RolePermissionVo findPermissionTree(Long roleId);

}
